package exam.demo2;

import java.util.Scanner;

public class Test1 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        String str = in.next();

        int max = 0;
        int i = 0;
        int tmp = 0;
        while(i < str.length()) {
            int len = 0;
            while(i < str.length() && str.charAt(i)-'0' >= 0 && str.charAt(i)-'0' <=9) {
                len++;
                i++;
            }
            if(max < len) {
                max = len;
                tmp = i;
            }
            i++;
        }

        String s = str.substring(tmp-max, tmp);
        System.out.println(s);
    }
}
